﻿namespace Dissemination.MVC.ViewModels
{
    using System.Linq;

    using Models;

    public class AssessmentReportViewModel
    {
        public Assessment Assessment
        {
            get;
            set;
        }

        public double? AssessmentOrganDonor
        {
            get
            {
                var tempArray = new[] { this.Assessment.AssessmentOrganDonorC, this.Assessment.AssessmentOrganDonorP, this.Assessment.AssessmentOrganDonorQ };
                return tempArray.Average();
            }
        }

        public int? AssessmentApplicability
        {
            get
            {
                return this.Assessment.AssessmentApplicability;
            }
        }

        public double? AssessmentApproach
        {
            get
            {
                var tempArray = new[] { this.Assessment.AssessmentApproachC, this.Assessment.AssessmentApproachP, this.Assessment.AssessmentApproachQ };
                return tempArray.Average();
            }
        }

        public double? AssessmentBrainDeath
        {
            get
            {
                var tempArray = new[] { this.Assessment.AssessmentBrainDeathC, this.Assessment.AssessmentBrainDeathP, this.Assessment.AssessmentBrainDeathQ };
                return tempArray.Average();
            }
        }

        public double? AssessmentCaseStudies
        {
            get
            {
                var tempArray = new[] { this.Assessment.AssessmentCaseStudiesC, this.Assessment.AssessmentCaseStudiesP, this.Assessment.AssessmentCaseStudiesQ };
                return tempArray.Average();
            }
        }

        public double? AssessmentDonor
        {
            get
            {
                var tempArray = new[] { this.Assessment.AssessmentDonorC, this.Assessment.AssessmentDonorP, this.Assessment.AssessmentDonorQ };
                return tempArray.Average();
            }
        }

        public double? AssessmentInterviews
        {
            get
            {
                var tempArray = new[] { this.Assessment.AssessmentInterviewsC, this.Assessment.AssessmentInterviewsP, this.Assessment.AssessmentInterviewsQ };
                return tempArray.Average();
            }
        }

        public int? AssessmentOrganization
        {
            get
            {
                return this.Assessment.AssessmentOrganization;
            }
        }

        public int? AssessmentOverall
        {
            get
            {
                return this.Assessment.AssessmentOverall;
            }
        }

        public int? AssessmentPostRegistration
        {
            get
            {
                return this.Assessment.AssessmentPostRegistration;
            }
        }

        public int? AssessmentPreRegistration
        {
            get
            {
                return this.Assessment.AssessmentPreRegistration;
            }
        }

        public double? AssessmentRetrieval
        {
            get
            {
                var tempArray = new[] { this.Assessment.AssessmentRetrievalC, this.Assessment.AssessmentRetrievalP, this.Assessment.AssessmentRetrievalQ };
                return tempArray.Average();
            }
        }

        public int? AssessmentSecretariat
        {
            get
            {
                return this.Assessment.AssessmentSecretariat;
            }
        }

        public double? AssessmentSimulation
        {
            get
            {
                var tempArray = new[] { this.Assessment.AssessmentSimulationC, this.Assessment.AssessmentSimulationP, this.Assessment.AssessmentSimulationQ };
                return tempArray.Average();
            }
        }

        public int? AssessmentSupport
        {
            get
            {
                return this.Assessment.AssessmentSupport;
            }
        }

        public double? AssessmentTeaching
        {
            get
            {
                return this.Assessment.AssessmentTeaching;
            }
        }

   
    }
}